Skip to content

Add fabric:false resource condition#5410

Open
cassiancc wants to merge 1 commit into
FabricMC:26.2from
cassiancc:false-conditions
Open

Add fabric:false resource condition#5410
cassiancc wants to merge 1 commit into
FabricMC:26.2from
cassiancc:false-conditions

Conversation

@cassiancc
Copy link
Copy Markdown
Member

Adds an equivalent to fabric:true that never passes, useful for quickly unloading resources like unwanted recipes or advancements. This is already possible by chaining fabric:not with fabric:true, but that is quite longwinded when manually updating JSON (e.g. modpacks), and having an obvious false is preferred. Uses of fabric:not when applied to fabric:true in data generation tests have been updated to use fabric:false.

@cassiancc cassiancc added enhancement New feature or request small change labels Jun 1, 2026
@modmuss50 modmuss50 added the status: last call If you care, make yourself heard right away! label Jun 1, 2026
@Test
public void logics() {
ResourceCondition alwaysTrue = ResourceConditions.alwaysTrue();
ResourceCondition alwaysFalse = ResourceConditions.not(alwaysTrue);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a separate test for not?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is still used in DataGeneratorTestEntrypoint, if it's needed elsewhere suggestions are welcome, I'm not too familiar with gametests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request small change status: last call If you care, make yourself heard right away!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants